package cn.easthome.util;

import java.sql.Date;
import java.text.SimpleDateFormat;

/**
 * 项目的工具类
 */
public class GlobalUtil {
    public static String getTime(long time) {
        //将时间转换成Date
        Date date = new Date(time);
        //格式化时间字符串
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String dateStr = sdf.format(date);
        return dateStr;
    }
}
